<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    iframe{
        width: 500px;
        height: 500px;
        border: 1px solid #ccc;
    }
</style>
<body>
    <a href="红.html" target="main">红色</a>
    <a href="绿.html" target="main">绿色</a>
    <a href="蓝.html" target="main">蓝色</a>

    <!-- 设置你信打开的页面要嵌套要给iframe设置一个name然后要嵌套的页面设置target对于iframe的name -->
    <!-- 默认打开是红.html -->
    <iframe src="红.html" name="main" ></iframe>
</body>
</html>